import { useDispatch } from 'react-redux'
import { show } from '@/store/slice/myToast'
export default function useToast() {
    const dispatch = useDispatch()
    return (text: string, type: ToastType = "success") => {
        dispatch(show({
            text,
            type
        }))
    }
}